 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body onload='javascript:document.getElementById("soct").focus();'>


{strip}
{assign var="pageTitle" value="Chung tu"}
{if ($loaitien) != 'VND' }
	{assign var="socot" value="6"}
{else}
	{assign var="socot" value="5"}
{/if}


{assign var="ngct" value=$smarty.now|date_format:"%d/%m/%Y"}
{include file="common/header.tpl"}

{/strip}

</br>

<form method="post" action="{url Nam= $xNam ChiTiet = $ChiTiet mant = $loaitien} ">

<table width = "60%" align = "center" >
<tr rowspan = "2">
<td width = "70%" align = "center" >
	<hr size="2" noshade style="color:#000000"  />

	T&#7915; ngày: <input type="text" name="fNgay1" value="{$Date1|date_format:"%d/%m/%Y"}" id="ngay1" size="10" maxlength="20"   class="textField" />
	{html_select_date prefix="dateExpire1" all_extra="class=\"selectMenu\""  day_extra= 1 start_year="-5" end_year="+5" time="$Date1"}

	&#272;&#7871;n ngày: <input type="text" name="fNgay2" value="{$Date2|date_format:"%d/%m/%Y"}" id="ngay2" size="10" maxlength="20"   class="textField" />
	<hr style="height:5px; visibility:hidden;" />
	<select name="searchField" size="1" class="selectMenu">
		{html_options options=$fieldOptions selected=$searchField}
	</select>

	<select name="searchMatch" size="1" class="selectMenu">
		<option value="contains"{if $searchMatch == 'contains'} selected="selected"{/if}>C&#243; ch&#7913;a</option>
		<option value="is"{if $searchMatch == 'is'} selected="selected"{/if}>L&#224;</option>
		<option value="startsWith"{if $searchMatch == 'startsWith'} selected="selected"{/if}>B&#7855;t &#273;&#7847;u l&#224; </option>
	</select>


	<input type="text" size="10" name="search" class="textField" value="{$search|escape}" />&nbsp;
	<hr size="2" noshade style="color:#000000"  />
		
</td>

<td width = "30%" align = "left">
	<input type="submit" value="Xem các phiếu" class="button defaultButton" />
</td>
</tr>

<tr>

</tr>
</table>

<br>

</form>
<div id="sections">

<table id="customers"  width="90%" align = "center" cellspacing="0" >
        <tr>
            <th>Ngày</th>
            <th>Số CT</th>
            <th>Diễn giải</th>
	    <th class="soquy">TK</th>
            <th>TK ĐU</th>
            <th>Chi tiết</th>
            <th id="sotien">Phát sinh</th>

	    <th>Tac vu</th>
        </tr>

	{foreach from=$ctkts item=ctkt}
	<tr>
	    <td>
		{$ctkt.ngct|date_format:"%d/%m/%Y"}
	    </td>
	    <td>
		{$ctkt.soct}
	    </td>
	    <td style="text-align:left" id="noidung">
		{$ctkt.diengiai}
	    </td>
	    <td style="text-align:left">
	    {$ctkt.tk}
	    </td>
	    <td style="text-align:left">
		{$ctkt.tkdu}
	    </td>
	    <td style="text-align:left">
		{$ctkt.macttkdu}
	    </td>

	    <td style="text-align:right" id="sotien">
		 {$ctkt.sotienvn|number_format:0:".":"."}
	    </td>
	    <td >

		<a  id = '{$ctkt.idphieu}' class="actiondelrow" href="javascript:void(0);" onclick="editCT('{$ctkt.idphieu}', '{$url}');">S&#7917;a </a>  &nbsp &nbsp
		<a  id = '{$ctkt.idphieu}' class="actiondelrow" href="javascript:void(0);" onclick="deleCT('{$host}', '{$username}', '{$password}', '{$databaseName}', '{$journalid}','{$xNam}', '{$ctkt.idphieu}', '{$ctkt.soct}', '{$urlDel}', '{$urlRFR}');">X&#243;a </a>  
	    </td>
	</tr>
	{/foreach}

</table>

</div>
{include file="common/footer.tpl"}

</body>
</html>

	
